home *** CD-ROM | disk | FTP | other *** search
- Path: uunet!zephyr.ens.tek.com!master!saab!billr
- From: billr@saab.CNA.TEK.COM (Bill Randle)
- Newsgroups: comp.sources.games
- Subject: v14i001: conquer4 - middle earth multi-player game (V4), Patch11a
- Message-ID: <3289@master.CNA.TEK.COM>
- Date: 3 Aug 92 18:34:58 GMT
- Sender: news@master.CNA.TEK.COM
- Lines: 2096
- Approved: billr@saab.CNA.TEK.COM
-
- Submitted-by: adb@cs.bu.edu
- Posting-number: Volume 14, Issue 1
- Archive-name: conquer4/Patch11a
- Patch-To: conquer4: Volume 6, Issue 83-96
- Environment:
-
- [From the author...]
-
- Enclosed is a patch for version 4 of conquer. This patch is mostly
- the work of people at RIT (mcy1580@ritvax.isc.rit.edu -- spide) but does
- contain some adjustments by me.
-
- The patch covers:
- o a compilation option to track usage [USERLOG]
- o a compilation option to leave space for rebellions [REVSPACE]
- o a compilation option to assign a user id to each
- nation, WARNING this will change the format of the
- data file, making older data files unreadable. [CHECKUSER]
- o a compilation option to control the last turn for adding. [LASTADD]
-
- It also includes some code adjustments to better conform to ANSI C specs.
-
- There are two files in the patch:
- WARNING.p11 -- warns about the CHECKUSER compilation option.
- patches11 -- contains all of the patches.
-
- If you have the patch program, you may apply the patch by getting into
- the source directory and typing "patch < patches11".
-
- Thanks once again to spide for sending me these patches... hopefully I will
- be able to follow up in a few months with the release of version 5. [Like
- I haven't been saying that for over a year. :-)]
-
- adam
- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- #!/bin/sh
- # This is a shell archive (produced by shar 3.49)
- # To extract the files from this archive, save it to a file, remove
- # everything above the "!/bin/sh" line above, and type "sh file_name".
- #
- # made 07/19/1992 17:44 UTC by adb@csa
- # Source directory /fs/home/guest/adb/src/misc
- #
- # existing files will NOT be overwritten unless -c is specified
- #
- # This is part 1 of a multipart archive
- # do not concatenate these parts, unpack them in order with /bin/sh
- #
- # This shar contains:
- # length mode name
- # ------ ---------- ------------------------------------------
- # 332 -rw-r--r-- WARNING.p11
- # 103096 -rw-r--r-- patches11
- #
- if test -r _shar_seq_.tmp; then
- echo 'Must unpack archives in sequence!'
- echo Please unpack part `cat _shar_seq_.tmp` next
- exit 1
- fi
- # ============= WARNING.p11 ==============
- if test -f 'WARNING.p11' -a X"$1" != X"-c"; then
- echo 'x - skipping WARNING.p11 (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'WARNING.p11' &&
- *** Warning:
- X
- This patch contains the "CHECKUSER" option which will make the data file
- incompatible with previous versions of 4.x data files. If you wish to use
- this patch with 4.10 data files -=DO NOT=- compile with the CHECKUSER option
- enabled.
- X
- -spide
- X mcy1580@ultb.isc.rit.edu
- X mcy1580@ritvax.isc.rit.edu
- X
- -adam
- X adb@cs.bu.edu
- SHAR_EOF
- chmod 0644 WARNING.p11 ||
- echo 'restore of WARNING.p11 failed'
- Wc_c="`wc -c < 'WARNING.p11'`"
- test 332 -eq "$Wc_c" ||
- echo 'WARNING.p11: original size 332, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= patches11 ==============
- if test -f 'patches11' -a X"$1" != X"-c"; then
- echo 'x - skipping patches11 (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'patches11' &&
- diff -cr ../oldconq4/Makefile ./Makefile
- *** ../oldconq4/Makefile Thu Jul 9 19:29:32 1992
- --- ./Makefile Thu Jul 9 17:45:30 1992
- ***************
- *** 77,96 ****
- X
- X # CURRENT is this directory. The directory where the source
- X # and Makefile are located
- ! CURRENT = /usr4/acm/stud/adb/src/conquer
- X
- X # DEFAULT is the directory where default nations & help files will be
- X # stored. It is also the default directory = where players will play
- X # if they do not use the -d option.
- ! DEFAULT = /usr4/acm/stud/adb/games/conqlib
- X
- X # This directory is where the executables will be stored
- ! EXEDIR = /usr4/acm/stud/adb/games
- X
- X # Definitions used for compiling conquer
- X CDEFS = -DDEFAULTDIR=\"$(DEFAULT)\" -DEXEDIR=\"$(EXEDIR)\"
- X
- ! # Options flag used for non-debugging purposes
- X OPTFLG = -O
- X
- X # Options flag used for debugging purposes
- --- 77,96 ----
- X
- X # CURRENT is this directory. The directory where the source
- X # and Makefile are located
- ! CURRENT = /usr/home/guest/adb/src/conquer
- X
- X # DEFAULT is the directory where default nations & help files will be
- X # stored. It is also the default directory = where players will play
- X # if they do not use the -d option.
- ! DEFAULT = /usr/home/guest/adb/games/conqlib
- X
- X # This directory is where the executables will be stored
- ! EXEDIR = /usr/home/guest/adb/games
- X
- X # Definitions used for compiling conquer
- X CDEFS = -DDEFAULTDIR=\"$(DEFAULT)\" -DEXEDIR=\"$(EXEDIR)\"
- X
- ! # Options flag used for normal compilation
- X OPTFLG = -O
- X
- X # Options flag used for debugging purposes
- ***************
- *** 214,220 ****
- X touch $(PSPROG)
- X touch in$(PSPROG)
- X
- ! install: in$(GAME) in$(ADMIN) in$(SORT) in$(PSPROG) insthelp
- X @echo ""
- X @echo "Installation complete"
- X
- --- 214,220 ----
- X touch $(PSPROG)
- X touch in$(PSPROG)
- X
- ! install: in$(GAME) in$(ADMIN) in$(SORT) in$(PSPROG) insthelp instman
- X @echo ""
- X @echo "Installation complete"
- X
- ***************
- *** 252,257 ****
- --- 252,261 ----
- X -$(RM) $(DEFAULT)/$(HELPOUT)5
- X -$(LN) $(CURRENT)/$(HELPOUT)5 $(DEFAULT)/$(HELPOUT)5
- X touch insthelp
- +
- + instman:
- + @echo Installing man pages
- + $(CP) man.pag $(EXEDIR)
- X
- X helpfile: $(HELPOUT)0 $(HELPOUT)1 $(HELPOUT)2 $(HELPOUT)3 $(HELPOUT)4 $(HELPOUT)5
- X @echo Helpfiles built
- Only in .: WARNING.p11
- diff -cr ../oldconq4/admin.c ./admin.c
- *** ../oldconq4/admin.c Thu Jul 9 19:29:33 1992
- --- ./admin.c Thu Jul 9 18:16:31 1992
- ***************
- *** 12,17 ****
- --- 12,18 ----
- X
- X #include "header.h"
- X #include "data.h"
- + #include <pwd.h>
- X #include <ctype.h>
- X
- X #include <signal.h>
- ***************
- *** 66,71 ****
- --- 67,73 ----
- X char defaultdir[BIGLTH],cq_opts[BIGLTH];
- X struct passwd *getpwnam(), *pwent;
- X
- + umask (MASK);
- X mflag = aflag = xflag = rflag = 0;
- X srand((unsigned) time((long *) 0));
- X strcpy(datadir,"");
- ***************
- *** 139,145 ****
- X case 'a': /* anyone with password can add player*/
- X aflag++;
- X break;
- ! case 'x': /* execute program*/
- X xflag++;
- X break;
- X case 'r': /* read map file */
- --- 141,147 ----
- X case 'a': /* anyone with password can add player*/
- X aflag++;
- X break;
- ! case 'x': /* execute (update) program*/
- X xflag++;
- X break;
- X case 'r': /* read map file */
- ***************
- *** 157,163 ****
- X printf("Command line format: %s [-max -dDIR -rSCENARIO]\n",argv[0]);
- X printf("\t-m make a world\n");
- X printf("\t-a add new player\n");
- ! printf("\t-x execute program\n");
- X printf("\t-d DIR to use play different game\n");
- X /* printf("\t-r SCENARIO read map while making a new world\n\t\t\tuses SCENARIO.ele, SCENARIO.veg, & SCENARIO.nat\n"); */
- X exit(SUCCESS);
- --- 159,165 ----
- X printf("Command line format: %s [-max -dDIR -rSCENARIO]\n",argv[0]);
- X printf("\t-m make a world\n");
- X printf("\t-a add new player\n");
- ! printf("\t-x execute (update) program\n");
- X printf("\t-d DIR to use play different game\n");
- X /* printf("\t-r SCENARIO read map while making a new world\n\t\t\tuses SCENARIO.ele, SCENARIO.veg, & SCENARIO.nat\n"); */
- X exit(SUCCESS);
- ***************
- *** 270,277 ****
- X printf("\n********************************************");
- X printf("\n* PREPARING TO ADD NEW PLAYERS *");
- X printf("\n********************************************\n");
- ! if( TURN > 5 ){
- ! printf("more than 5 turns have passed since game start!\n");
- X printf("permission of game administrator required\n");
- X if(strncmp(crypt(getpass("\nwhat is conquer super user password:"),SALT),ntn[0].passwd,PASSLTH)!=0)
- X {
- --- 272,279 ----
- X printf("\n********************************************");
- X printf("\n* PREPARING TO ADD NEW PLAYERS *");
- X printf("\n********************************************\n");
- ! if( TURN > LASTADD ){
- ! printf("more than %d turns have passed since game start!\n", LASTADD);
- X printf("permission of game administrator required\n");
- X if(strncmp(crypt(getpass("\nwhat is conquer super user password:"),SALT),ntn[0].passwd,PASSLTH)!=0)
- X {
- ***************
- *** 290,302 ****
- X /* disable interrupts */
- X signal(SIGINT,SIG_IGN);
- X signal(SIGQUIT,SIG_IGN);
- ! newlogin();
- X unlink(string);
- X exit(SUCCESS);
- X }
- X
- X #ifdef OGOD
- ! if ((realuser != (getpwnam(LOGIN))->pw_uid ) &&
- X ((pwent=getpwnam(ntn[0].leader)) == NULL ||
- X realuser != pwent->pw_uid )) {
- X printf("Sorry -- you can not administrate conquer\n");
- --- 292,304 ----
- X /* disable interrupts */
- X signal(SIGINT,SIG_IGN);
- X signal(SIGQUIT,SIG_IGN);
- ! newlogin(realuser);
- X unlink(string);
- X exit(SUCCESS);
- X }
- X
- X #ifdef OGOD
- ! if ((realuser != (getpwnam(LOGIN)->pw_uid) ) &&
- X ((pwent=getpwnam(ntn[0].leader)) == NULL ||
- X realuser != pwent->pw_uid )) {
- X printf("Sorry -- you can not administrate conquer\n");
- ***************
- *** 307,313 ****
- X printf("\n");
- X exit(FAIL);
- X }
- ! #endif OGOD
- X
- X if (xflag) { /* update the game */
- X #ifndef OGOD
- --- 309,315 ----
- X printf("\n");
- X exit(FAIL);
- X }
- ! #endif /* OGOD */
- X
- X if (xflag) { /* update the game */
- X #ifndef OGOD
- ***************
- *** 322,328 ****
- X printf("\n");
- X exit(FAIL);
- X }
- ! #endif OGOD
- X #ifdef RUNSTOP
- X /* check if any players are on */
- X for (i=0;i<NTOTAL;i++) {
- --- 324,330 ----
- X printf("\n");
- X exit(FAIL);
- X }
- ! #endif /* OGOD */
- X #ifdef RUNSTOP
- X /* check if any players are on */
- X for (i=0;i<NTOTAL;i++) {
- ***************
- *** 333,339 ****
- X exit(FAIL);
- X }
- X }
- ! #endif RUNSTOP
- X sprintf(string,"%sup",isonfile);
- X if(check_lock(string,TRUE)==TRUE) {
- X printf("Another update is still executing.\n");
- --- 335,341 ----
- X exit(FAIL);
- X }
- X }
- ! #endif /* RUNSTOP */
- X sprintf(string,"%sup",isonfile);
- X if(check_lock(string,TRUE)==TRUE) {
- X printf("Another update is still executing.\n");
- ***************
- *** 356,362 ****
- X printf("\t-a add new player\n");
- X printf("\t-d DIR to use play different game\n");
- X printf("\t-m make a world\n");
- ! printf("\t-x execute program\n");
- X exit(SUCCESS);
- X }
- X
- --- 358,364 ----
- X printf("\t-a add new player\n");
- X printf("\t-d DIR to use play different game\n");
- X printf("\t-m make a world\n");
- ! printf("\t-x execute (update) program\n");
- X exit(SUCCESS);
- X }
- X
- ***************
- *** 643,649 ****
- X curntn->farm_ability += (*(tg_value+good)-'0');
- X else curntn->farm_ability = MAXTGVAL;
- X } else if( good <= END_SPELL ) {
- ! curntn->spellpts++;
- X } else if( good <= END_TERROR ) {
- X if(curntn->terror + (*(tg_value+good)-'0')< MAXTGVAL)
- X curntn->terror += (*(tg_value+good)-'0');
- --- 645,651 ----
- X curntn->farm_ability += (*(tg_value+good)-'0');
- X else curntn->farm_ability = MAXTGVAL;
- X } else if( good <= END_SPELL ) {
- ! curntn->spellpts += sptr->people/1000 +1;
- X } else if( good <= END_TERROR ) {
- X if(curntn->terror + (*(tg_value+good)-'0')< MAXTGVAL)
- X curntn->terror += (*(tg_value+good)-'0');
- diff -cr ../oldconq4/cexecute.c ./cexecute.c
- *** ../oldconq4/cexecute.c Thu Jul 9 19:29:33 1992
- --- ./cexecute.c Thu Jul 9 18:16:44 1992
- ***************
- *** 90,96 ****
- X ntn[y].tgold += longvar;
- X #ifdef DEBUG
- X fprintf(stderr,"DEBUG: BRIBE BY %s of %s\n",ntn[country].name,ntn[y].name);
- ! #endif DEBUG
- X /* x represents chance of successful bribe */
- X if(npctype(curntn->active)==npctype(ntn[y].active))
- X x = 50;
- --- 90,96 ----
- X ntn[y].tgold += longvar;
- X #ifdef DEBUG
- X fprintf(stderr,"DEBUG: BRIBE BY %s of %s\n",ntn[country].name,ntn[y].name);
- ! #endif /* DEBUG */
- X /* x represents chance of successful bribe */
- X if(npctype(curntn->active)==npctype(ntn[y].active))
- X x = 50;
- ***************
- *** 101,107 ****
- X if( rand()%100 < x){
- X #ifdef DEBUG
- X fprintf(stderr,"DEBUG: BRIBE IS SUCCESS\n");
- ! #endif DEBUG
- X ntn[y].dstatus[country]--;
- X }
- X break;
- --- 101,107 ----
- X if( rand()%100 < x){
- X #ifdef DEBUG
- X fprintf(stderr,"DEBUG: BRIBE IS SUCCESS\n");
- ! #endif /* DEBUG */
- X ntn[y].dstatus[country]--;
- X }
- X break;
- ***************
- *** 155,161 ****
- X case NPOP: /* set various nation attributes */
- X #ifdef CONQUER
- X terror_adj++;
- ! #endif CONQUER
- X curntn->popularity = armynum;
- X curntn->terror = x;
- X curntn->reputation = y;
- --- 155,161 ----
- X case NPOP: /* set various nation attributes */
- X #ifdef CONQUER
- X terror_adj++;
- ! #endif /* CONQUER */
- X curntn->popularity = armynum;
- X curntn->terror = x;
- X curntn->reputation = y;
- ***************
- *** 320,323 ****
- X /* exit program */
- X exit(FAIL);
- X }
- ! #endif CONQUER
- --- 320,323 ----
- X /* exit program */
- X exit(FAIL);
- X }
- ! #endif /* CONQUER */
- diff -cr ../oldconq4/check.c ./check.c
- *** ../oldconq4/check.c Thu Jul 9 19:26:30 1992
- --- ./check.c Thu Jul 9 18:16:57 1992
- ***************
- *** 187,193 ****
- X fprintf(stderr,"file %s line %d\n",file,line);
- X verifydata(file,line);
- X }
- ! #endif DEBUG
- X
- X #include <fcntl.h>
- X #ifdef FILELOCK
- --- 187,193 ----
- X fprintf(stderr,"file %s line %d\n",file,line);
- X verifydata(file,line);
- X }
- ! #endif /* DEBUG */
- X
- X #include <fcntl.h>
- X #ifdef FILELOCK
- ***************
- *** 199,205 ****
- X # include <sys/file.h>
- X # define do_lock(fd) flock(fd,LOCK_EX|LOCK_NB)
- X #endif
- ! #endif FILELOCK
- X
- X /*
- X * check_lock() -- routine to check if a file is locked.
- --- 199,205 ----
- X # include <sys/file.h>
- X # define do_lock(fd) flock(fd,LOCK_EX|LOCK_NB)
- X #endif
- ! #endif /* FILELOCK */
- X
- X /*
- X * check_lock() -- routine to check if a file is locked.
- ***************
- *** 249,254 ****
- X exit(FAIL);
- X }
- X }
- ! #endif FILELOCK
- X return(hold);
- X }
- --- 249,254 ----
- X exit(FAIL);
- X }
- X }
- ! #endif /* FILELOCK */
- X return(hold);
- X }
- diff -cr ../oldconq4/combat.c ./combat.c
- *** ../oldconq4/combat.c Thu Jul 9 19:29:34 1992
- --- ./combat.c Thu Jul 9 18:17:15 1992
- ***************
- *** 469,480 ****
- X else if(retreatside==DFND) PDloss+=15;
- X #ifdef DEBUG
- X printf("side %d (%d %d) can't retreat...+15%% loss\n",retreatside,retreatx,retreaty);
- ! #endif DEBUG
- X retreatside = 0;
- X }
- X #ifdef DEBUG
- X else printf("retreat side %d to %d %d\n",retreatside,retreatx,retreaty);
- ! #endif DEBUG
- X }
- X
- X if(PAloss>100) PAloss = 100;
- --- 469,480 ----
- X else if(retreatside==DFND) PDloss+=15;
- X #ifdef DEBUG
- X printf("side %d (%d %d) can't retreat...+15%% loss\n",retreatside,retreatx,retreaty);
- ! #endif /* DEBUG */
- X retreatside = 0;
- X }
- X #ifdef DEBUG
- X else printf("retreat side %d to %d %d\n",retreatside,retreatx,retreaty);
- ! #endif /* DEBUG */
- X }
- X
- X if(PAloss>100) PAloss = 100;
- ***************
- *** 795,801 ****
- X retreaty=y;
- X #ifdef DEBUG
- X printf("armies in %d %d retreat to %d %d\n",xsctr,ysctr,x,y);
- ! #endif DEBUG
- X return;
- X }
- X }
- --- 795,801 ----
- X retreaty=y;
- X #ifdef DEBUG
- X printf("armies in %d %d retreat to %d %d\n",xsctr,ysctr,x,y);
- ! #endif /* DEBUG */
- X return;
- X }
- X }
- ***************
- *** 996,1002 ****
- X }
- X #ifdef DEBUG
- X printf("capture percentage: attack = %d defend = %d\n",acptpct,dcptpct);
- ! #endif DEBUG
- X
- X /*figure combat on a one-to-one basis */
- X /* use a bell curve roll */
- --- 996,1002 ----
- X }
- X #ifdef DEBUG
- X printf("capture percentage: attack = %d defend = %d\n",acptpct,dcptpct);
- ! #endif /* DEBUG */
- X
- X /*figure combat on a one-to-one basis */
- X /* use a bell curve roll */
- ***************
- *** 1009,1015 ****
- X PAloss = MAXLOSS * (100 - roll) / 100;
- X #ifdef DEBUG
- X printf("Pdloss = %d PAloss = %d\n",PDloss,PAloss);
- ! #endif DEBUG
- X
- X /* adjust based on the odds */
- X if( odds == 1 ) {
- --- 1009,1015 ----
- X PAloss = MAXLOSS * (100 - roll) / 100;
- X #ifdef DEBUG
- X printf("Pdloss = %d PAloss = %d\n",PDloss,PAloss);
- ! #endif /* DEBUG */
- X
- X /* adjust based on the odds */
- X if( odds == 1 ) {
- ***************
- *** 1319,1325 ****
- X #ifdef DEBUG
- X printf("capture: hdcnt==%d typ==%d spsz==%d to==%d\n",holdcount,
- X type,shipsize,to);
- ! #endif DEBUG
- X for (i=0;holdcount && i<count;i++) {
- X if (owner[i]!=(-1) && side[i]==to) {
- X curntn= &ntn[owner[i]];
- --- 1319,1325 ----
- X #ifdef DEBUG
- X printf("capture: hdcnt==%d typ==%d spsz==%d to==%d\n",holdcount,
- X type,shipsize,to);
- ! #endif /* DEBUG */
- X for (i=0;holdcount && i<count;i++) {
- X if (owner[i]!=(-1) && side[i]==to) {
- X curntn= &ntn[owner[i]];
- ***************
- *** 1332,1338 ****
- X }
- X #ifdef DEBUG
- X printf("capture 2: holdcount==%d i==%d\n",holdcount,i);
- ! #endif DEBUG
- X if (i==count) {
- X curntn = saventn;
- X return;
- --- 1332,1338 ----
- X }
- X #ifdef DEBUG
- X printf("capture 2: holdcount==%d i==%d\n",holdcount,i);
- ! #endif /* DEBUG */
- X if (i==count) {
- X curntn = saventn;
- X return;
- ***************
- *** 1339,1346 ****
- X }
- X nvynum = unit[i];
- X #ifdef DEBUG
- ! printf("Should have succesful capture of %d\n",type);
- ! #endif DEBUG
- X switch(type) {
- X case QWAR:
- X (void) NADD_WAR(1);
- --- 1339,1346 ----
- X }
- X nvynum = unit[i];
- X #ifdef DEBUG
- ! printf("Should have successful capture of %d\n",type);
- ! #endif /* DEBUG */
- X switch(type) {
- X case QWAR:
- X (void) NADD_WAR(1);
- diff -cr ../oldconq4/commands.c ./commands.c
- *** ../oldconq4/commands.c Thu Jul 9 19:29:35 1992
- --- ./commands.c Thu Jul 9 18:17:31 1992
- ***************
- *** 1145,1151 ****
- X #ifdef SYSMAIL
- X /* increase size to ensure mail check works */
- X conq_mail_size++;
- ! #endif SYSMAIL
- X }
- X
- X void
- --- 1145,1151 ----
- X #ifdef SYSMAIL
- X /* increase size to ensure mail check works */
- X conq_mail_size++;
- ! #endif /* SYSMAIL */
- X }
- X
- X void
- diff -cr ../oldconq4/data.c ./data.c
- *** ../oldconq4/data.c Thu Jul 9 19:26:28 1992
- --- ./data.c Thu Jul 9 18:17:49 1992
- ***************
- *** 47,53 ****
- X char *soldname[]= { "?","MARCH","SCOUT","GARRISON","TRADED","MILITIA",
- X "FLYING","DEFEND","MAG_DEF","ATTACK","MAG_ATT","GENERAL","SORTIE",
- X "SIEGE","BESIEGED","ON_BOARD","RULE"};
- ! #endif CONQUER
- X
- X char *directions[]= { "here", "north", "northeast", "east", "southeast",
- X "south", "southwest", "west", "northwest"};
- --- 47,53 ----
- X char *soldname[]= { "?","MARCH","SCOUT","GARRISON","TRADED","MILITIA",
- X "FLYING","DEFEND","MAG_DEF","ATTACK","MAG_ATT","GENERAL","SORTIE",
- X "SIEGE","BESIEGED","ON_BOARD","RULE"};
- ! #endif /* CONQUER */
- X
- X char *directions[]= { "here", "north", "northeast", "east", "southeast",
- X "south", "southwest", "west", "northwest"};
- ***************
- *** 82,88 ****
- X "Hero", "Cent", "gt", "Shro", "Mumm",
- X "Elem", "mino", "daem", "Bal", "Drgn"
- X };
- ! #endif CONQUER
- X int unitminsth[]= /* min strength of a unit */
- X {
- X 1, 1, 1, 1, 1, 1, 1,
- --- 82,88 ----
- X "Hero", "Cent", "gt", "Shro", "Mumm",
- X "Elem", "mino", "daem", "Bal", "Drgn"
- X };
- ! #endif /* CONQUER */
- X int unitminsth[]= /* min strength of a unit */
- X {
- X 1, 1, 1, 1, 1, 1, 1,
- ***************
- *** 187,199 ****
- X #ifdef ADMIN
- X char scenario[NAMELTH+1];
- X char *npcsfile = "nations";
- ! #endif ADMIN
- X char *helpfile = "help";
- X char *newsfile = "news";
- X char *isonfile = "lock";
- X #ifdef TRADE
- X char *tradefile = "commerce";
- ! #endif TRADE
- X
- X char *seasonstr[] = { "Winter", "Spring", "Summer", "Fall" };
- X
- --- 187,199 ----
- X #ifdef ADMIN
- X char scenario[NAMELTH+1];
- X char *npcsfile = "nations";
- ! #endif /* ADMIN */
- X char *helpfile = "help";
- X char *newsfile = "news";
- X char *isonfile = "lock";
- X #ifdef TRADE
- X char *tradefile = "commerce";
- ! #endif /* TRADE */
- X
- X char *seasonstr[] = { "Winter", "Spring", "Summer", "Fall" };
- X
- ***************
- *** 253,262 ****
- X #ifdef SYSMAIL
- X char sysmail[FILELTH];
- X int sys_mail_status;
- ! #endif SYSMAIL
- X char conqmail[FILELTH];
- X int conq_mail_status;
- ! #endif CONQUER
- X
- X /* trade good value - zeroes in this comment line mark increments of ten*/
- X /* 0 0 0 0 0 0 */
- --- 253,262 ----
- X #ifdef SYSMAIL
- X char sysmail[FILELTH];
- X int sys_mail_status;
- ! #endif /* SYSMAIL */
- X char conqmail[FILELTH];
- X int conq_mail_status;
- ! #endif /* CONQUER */
- X
- X /* trade good value - zeroes in this comment line mark increments of ten*/
- X /* 0 0 0 0 0 0 */
- diff -cr ../oldconq4/data.h ./data.h
- *** ../oldconq4/data.h Thu Jul 9 19:26:25 1992
- --- ./data.h Thu Jul 9 17:52:44 1992
- ***************
- *** 375,380 ****
- --- 375,383 ----
- X char race; /* national race (integer--see header.h)*/
- X char location; /* location variable (gfr) */
- X char mark; /* unique mark for nation */
- + #ifdef CHECKUSER
- + short int uid; /* for uid checking (CHECKUSER) */
- + #endif /* CHECKUSER */
- X unsigned char capx; /* Capitol x coordinate */
- X unsigned char capy; /* Capitol y coordinate */
- X unsigned char active; /* nation type and strategy */
- diff -cr ../oldconq4/extcmds.c ./extcmds.c
- *** ../oldconq4/extcmds.c Thu Jul 9 19:29:33 1992
- --- ./extcmds.c Thu Jul 9 18:18:05 1992
- ***************
- *** 92,98 ****
- X switch(astat) {
- X #ifdef TRADE
- X case TRADED:
- ! #endif TRADE
- X case FLIGHT:
- X case MAGATT:
- X case MAGDEF:
- --- 92,98 ----
- X switch(astat) {
- X #ifdef TRADE
- X case TRADED:
- ! #endif /* TRADE */
- X case FLIGHT:
- X case MAGATT:
- X case MAGDEF:
- ***************
- *** 267,273 ****
- X if(men<25 || armynum < 0 || armynum >= MAXARM || P_ASOLD < men+25 || P_ASTAT==ONBOARD || P_ASTAT==TRADED) {
- X #else
- X if(men<25 || armynum < 0 || armynum >= MAXARM || P_ASOLD < men+25 || P_ASTAT==ONBOARD) {
- ! #endif TRADE
- X errormsg("Selected army too small or illegal");
- X return;
- X }
- --- 267,273 ----
- X if(men<25 || armynum < 0 || armynum >= MAXARM || P_ASOLD < men+25 || P_ASTAT==ONBOARD || P_ASTAT==TRADED) {
- X #else
- X if(men<25 || armynum < 0 || armynum >= MAXARM || P_ASOLD < men+25 || P_ASTAT==ONBOARD) {
- ! #endif /* TRADE */
- X errormsg("Selected army too small or illegal");
- X return;
- X }
- diff -cr ../oldconq4/forms.c ./forms.c
- *** ../oldconq4/forms.c Thu Jul 9 19:29:34 1992
- --- ./forms.c Thu Jul 9 18:18:14 1992
- ***************
- *** 391,397 ****
- X short isgod=FALSE;
- X #ifdef OGOD
- X FILE *ftmp;
- ! #endif OGOD
- X char filename[FILELTH];
- X
- X if(country==0) {
- --- 391,397 ----
- X short isgod=FALSE;
- X #ifdef OGOD
- X FILE *ftmp;
- ! #endif /* OGOD */
- X char filename[FILELTH];
- X
- X if(country==0) {
- ***************
- *** 491,497 ****
- X if(isgod==TRUE) mvaddstr(LINES-3,COLS/2-33,"HIT 8 TO DESTROY, 9 TO CHANGE COMMODITY OR '0' TO CHANGE DEMI-GOD");
- X #else OGOD
- X if(isgod==TRUE) mvaddstr(LINES-3,COLS/2-24,"HIT 8 TO DESTROY NATION, OR '0' TO CHANGE DEMI-GOD");
- ! #endif OGOD
- X else mvaddstr(LINES-3,COLS/2-14,"HIT ANY OTHER KEY TO CONTINUE");
- X standend();
- X refresh();
- --- 491,497 ----
- X if(isgod==TRUE) mvaddstr(LINES-3,COLS/2-33,"HIT 8 TO DESTROY, 9 TO CHANGE COMMODITY OR '0' TO CHANGE DEMI-GOD");
- X #else OGOD
- X if(isgod==TRUE) mvaddstr(LINES-3,COLS/2-24,"HIT 8 TO DESTROY NATION, OR '0' TO CHANGE DEMI-GOD");
- ! #endif /* OGOD */
- X else mvaddstr(LINES-3,COLS/2-14,"HIT ANY OTHER KEY TO CONTINUE");
- X standend();
- X refresh();
- ***************
- *** 773,779 ****
- X fclose(ftmp);
- X }
- X break;
- ! #endif OGOD
- X case '0':
- X if(isgod==TRUE) {
- X mvaddstr(LINES-2,0,"ENTER CONQUER SUPER-USER PASSWORD:");
- --- 773,779 ----
- X fclose(ftmp);
- X }
- X break;
- ! #endif /* OGOD */
- X case '0':
- X if(isgod==TRUE) {
- X mvaddstr(LINES-2,0,"ENTER CONQUER SUPER-USER PASSWORD:");
- Only in .: getopt.c
- diff -cr ../oldconq4/header.h ./header.h
- *** ../oldconq4/header.h Thu Jul 9 19:29:33 1992
- --- ./header.h Thu Jul 9 17:52:04 1992
- ***************
- *** 1,8 ****
- X /* conquer : Copyright (c) 1988, 1989 by Ed Barlow.
- -
- X MODIFICATION OF THIS FILE IMPLIES THAT THE MODIFIER WILL ACCEPT
- X A LIMITED USE COPYRIGHT AS FOLLOWS:
- X
- X 1) This software is copyrighted and protected by law. The
- X sole owner of this software, which hereafter is known as
- X "conquer" is Edward M. Barlow, who hereby grants you a
- --- 1,8 ----
- X /* conquer : Copyright (c) 1988, 1989 by Ed Barlow.
- X MODIFICATION OF THIS FILE IMPLIES THAT THE MODIFIER WILL ACCEPT
- X A LIMITED USE COPYRIGHT AS FOLLOWS:
- X
- +
- X 1) This software is copyrighted and protected by law. The
- X sole owner of this software, which hereafter is known as
- X "conquer" is Edward M. Barlow, who hereby grants you a
- ***************
- *** 44,69 ****
- X */
- X
- X /* --- MODIFICATION IS REQUIRED OF THE FOLLOWING DEFINE STATEMENTS --- */
- ! #define OWNER "Ed Barlow" /* administrators name */
- ! #define LOGIN "smile" /* administrators login id. IMPORTANT! */
- X /* only this UID may update. */
- ! #define SYSV /* uncomment this line on a UNIX SYSV machine */
- ! /* #define BSD /* uncomment this line on a BSD machine */
- X /* #define HPUX /* uncomment for HP-UNIX */
- ! /*#define XENIX /* this plus SYSV for XENIX machines, untested */
- ! /* #define SYSMAIL /* if your system supports mail */
- X /* conquer will notify you about system mail */
- X
- ! /* -------------------MODIFICATION IS OPTIONAL ON THE FOLLOWING-----------*/
- X #define SPOOLDIR "/usr/spool/mail" /* location of mail spool */
- ! /* #define FILELOCK /* if your system supports BSD flock() */
- X /* other file locking is not well implemented */
- ! /*#define LOCKF /* in addition to FILELOCK if you have lockf */
- ! #define TIMELOG /* if your system has the date command */
- X
- X #define NTOTAL 25 /* max # of nations ( player + npc + monster ) */
- X #define MAXPTS 65 /* points for players to buy stuff with at start*/
- ! #define MAXARM 40 /* maximum number of armies per nation */
- X #define MAXNAVY 10 /* maximum number of fleets per nation */
- X #define PDEPLETE 30 /* % of armies/sectors depleted without Capitol */
- X #define PFINDSCOUT 50 /* percentage chance for capturing scouts */
- --- 44,70 ----
- X */
- X
- X /* --- MODIFICATION IS REQUIRED OF THE FOLLOWING DEFINE STATEMENTS --- */
- ! #define OWNER "Adam Bryant" /* administrators name */
- ! #define LOGIN "adb" /* administrators login id. IMPORTANT! */
- X /* only this UID may update. */
- ! /* #define SYSV /* uncomment this line on a UNIX SYSV machine */
- ! #define BSD /* uncomment this line on a BSD machine */
- X /* #define HPUX /* uncomment for HP-UNIX */
- ! /*#define XENIX /* this plus SYSV for XENIX machines, untested */
- ! #define SYSMAIL /* if your system supports mail */
- X /* conquer will notify you about system mail */
- X
- ! /* ------------------MODIFICATION IS OPTIONAL ON THE FOLLOWING----------*/
- X #define SPOOLDIR "/usr/spool/mail" /* location of mail spool */
- ! #define FILELOCK /* if your system supports BSD flock() */
- X /* other file locking is not well implemented */
- ! /*#define LOCKF /* in addition to FILELOCK if you have lockf */
- ! /* this is needed on NFS remote file systems */
- ! #define TIMELOG /* if your system has the date command */
- X
- X #define NTOTAL 25 /* max # of nations ( player + npc + monster ) */
- X #define MAXPTS 65 /* points for players to buy stuff with at start*/
- ! #define MAXARM 50 /* maximum number of armies per nation */
- X #define MAXNAVY 10 /* maximum number of fleets per nation */
- X #define PDEPLETE 30 /* % of armies/sectors depleted without Capitol */
- X #define PFINDSCOUT 50 /* percentage chance for capturing scouts */
- ***************
- *** 79,85 ****
- X #define REMAKE /* may make a world even if datafile exists. */
- X /* this allows demi-gods the ability to remake */
- X /* their world. */
- ! /* #define NOSCORE /* only show full scores to god while in game */
- X #define DERVDESG /* allow DERVISH to redesignate in DESERT/ICE */
- X #define MONSTER 45 /* defined if pirates/savages/nomads/lzard exist.
- X represents # of sectors of land that need to be
- --- 80,91 ----
- X #define REMAKE /* may make a world even if datafile exists. */
- X /* this allows demi-gods the ability to remake */
- X /* their world. */
- ! #define NOSCORE /* only show full scores to god while in game */
- ! /* #define CHECKUSER */ /* only allow owner of nation to play it */
- ! #define REVSPACE 5 /* allow for this many revolts in nation list */
- ! #define LASTADD 5 /* last turn players may w/out password */
- ! #define USERLOG /* log users who play a nation */
- ! #define MASK 037 /* data file protection mask (umask) */
- X #define DERVDESG /* allow DERVISH to redesignate in DESERT/ICE */
- X #define MONSTER 45 /* defined if pirates/savages/nomads/lzard exist.
- X represents # of sectors of land that need to be
- diff -cr ../oldconq4/io.c ./io.c
- *** ../oldconq4/io.c Thu Jul 9 19:22:33 1992
- --- ./io.c Thu Jul 9 18:18:26 1992
- ***************
- *** 209,215 ****
- X putc('\n',stdout);
- X }
- X }
- ! #endif CONQUER
- X
- X /************************************************************************/
- X /* WRITEDATA() - write data to datafile */
- --- 209,215 ----
- X putc('\n',stdout);
- X }
- X }
- ! #endif /* CONQUER */
- X
- X /************************************************************************/
- X /* WRITEDATA() - write data to datafile */
- ***************
- *** 223,229 ****
- X
- X printf("\ndoing write of data\n");
- X if((fd = creat(datafile,0666))==-1) {
- ! printf("cant open data. check permissions\n");
- X abrt();
- X }
- X
- --- 223,229 ----
- X
- X printf("\ndoing write of data\n");
- X if((fd = creat(datafile,0666))==-1) {
- ! printf("cannot open data. check permissions\n");
- X abrt();
- X }
- X
- ***************
- *** 277,283 ****
- X }
- X #ifdef DEBUG
- X fprintf(stderr,"reading %d bytes of world data\n",sizeof(struct s_world));
- ! #endif DEBUG
- X
- X getspace();
- X
- --- 277,283 ----
- X }
- X #ifdef DEBUG
- X fprintf(stderr,"reading %d bytes of world data\n",sizeof(struct s_world));
- ! #endif /* DEBUG */
- X
- X getspace();
- X
- ***************
- *** 291,297 ****
- X }
- X #ifdef DEBUG
- X fprintf(stderr,"reading %d bytes of sector data\n",n_read);
- ! #endif DEBUG
- X if((n_read=read(fd,ntn,NTOTAL*sizeof(struct s_nation))) == -1)
- X printf("error reading s_nation data (ntn)\n");
- X else if(n_read!= NTOTAL*sizeof(struct s_nation)) {
- --- 291,297 ----
- X }
- X #ifdef DEBUG
- X fprintf(stderr,"reading %d bytes of sector data\n",n_read);
- ! #endif /* DEBUG */
- X if((n_read=read(fd,ntn,NTOTAL*sizeof(struct s_nation))) == -1)
- X printf("error reading s_nation data (ntn)\n");
- X else if(n_read!= NTOTAL*sizeof(struct s_nation)) {
- ***************
- *** 301,307 ****
- X }
- X #ifdef DEBUG
- X fprintf(stderr,"reading %d bytes of nation data\n",n_read);
- ! #endif DEBUG
- X close(fd);
- X } /* readdata() */
- X
- --- 301,307 ----
- X }
- X #ifdef DEBUG
- X fprintf(stderr,"reading %d bytes of nation data\n",n_read);
- ! #endif /* DEBUG */
- X close(fd);
- X } /* readdata() */
- X
- ***************
- *** 535,541 ****
- X }
- X }
- X }
- ! #endif CONQUER
- X
- X /************************************************************************/
- X /* FLEE() - civilains in x,y flee from somebody */
- --- 535,541 ----
- X }
- X }
- X }
- ! #endif /* CONQUER */
- X
- X /************************************************************************/
- X /* FLEE() - civilains in x,y flee from somebody */
- ***************
- *** 576,582 ****
- X mvaddstr(LINES-2,20,"CIVILIANS ABANDON SECTOR");
- X }
- X }
- ! #endif CONQUER
- X for(i=x-2;i<=x+2;i++) for(j=y-2;j<=y+2;j++)
- X if(ONMAP(i,j)
- X &&(ntn[sct[i][j].owner].race==ntn[sct[x][y].owner].race)) {
- --- 576,582 ----
- X mvaddstr(LINES-2,20,"CIVILIANS ABANDON SECTOR");
- X }
- X }
- ! #endif /* CONQUER */
- X for(i=x-2;i<=x+2;i++) for(j=y-2;j<=y+2;j++)
- X if(ONMAP(i,j)
- X &&(ntn[sct[i][j].owner].race==ntn[sct[x][y].owner].race)) {
- ***************
- *** 594,600 ****
- X if(count>0) {
- X #ifdef CONQUER
- X if(isupd==0) mvaddstr(LINES-2,20,"PEOPLE FLEE SECTOR AND HALF DIE");
- ! #endif CONQUER
- X for(i=x-4;i<=x+4;i++) for(j=y-4;j<=y+4;j++)
- X if(ONMAP(i,j)
- X &&(ntn[sct[i][j].owner].race==ntn[sct[x][y].owner].race)) {
- --- 594,600 ----
- X if(count>0) {
- X #ifdef CONQUER
- X if(isupd==0) mvaddstr(LINES-2,20,"PEOPLE FLEE SECTOR AND HALF DIE");
- ! #endif /* CONQUER */
- X for(i=x-4;i<=x+4;i++) for(j=y-4;j<=y+4;j++)
- X if(ONMAP(i,j)
- X &&(ntn[sct[i][j].owner].race==ntn[sct[x][y].owner].race)) {
- ***************
- *** 604,610 ****
- X }
- X #ifdef CONQUER
- X else if(isupd==0) mvaddstr(LINES-2,20,"PEOPLE IN SECTOR DIE");
- ! #endif CONQUER
- X }
- X
- X sct[x][y].people = slaves;
- --- 604,610 ----
- X }
- X #ifdef CONQUER
- X else if(isupd==0) mvaddstr(LINES-2,20,"PEOPLE IN SECTOR DIE");
- ! #endif /* CONQUER */
- X }
- X
- X sct[x][y].people = slaves;
- ***************
- *** 664,670 ****
- X
- X return(TRUE);
- X }
- ! #endif ADMIN
- X
- X /*********************************************************************/
- X /* M2ALLOC() - two dimensional array allocator (because C is stupid) */
- --- 664,670 ----
- X
- X return(TRUE);
- X }
- ! #endif /* ADMIN */
- X
- X /*********************************************************************/
- X /* M2ALLOC() - two dimensional array allocator (because C is stupid) */
- ***************
- *** 681,687 ****
- X malloc( (unsigned) (nrows*(sizeof(char *)+entrysize)));
- X
- X if( baseaddr == (char **) NULL ) {
- ! printf("OOPS - cant allocate %d by %d blocks of %d bytes\n",nrows,ncols,entrysize);
- X abrt();
- X }
- X if(nrows>0){
- --- 681,687 ----
- X malloc( (unsigned) (nrows*(sizeof(char *)+entrysize)));
- X
- X if( baseaddr == (char **) NULL ) {
- ! printf("OOPS - cannot allocate %d by %d blocks of %d bytes\n",nrows,ncols,entrysize);
- X abrt();
- X }
- X if(nrows>0){
- diff -cr ../oldconq4/magic.c ./magic.c
- *** ../oldconq4/magic.c Thu Jul 9 19:26:28 1992
- --- ./magic.c Thu Jul 9 18:18:45 1992
- ***************
- *** 246,252 ****
- X refresh();
- X if (getch()=='y') god_magk();
- X } else
- ! #endif OGOD
- X if(price <= curntn->jewels){
- X
- X mvaddstr(county++,0,"DO YOU WISH TO BUY A RANDOM NEW POWER? [yn]");
- --- 246,252 ----
- X refresh();
- X if (getch()=='y') god_magk();
- X } else
- ! #endif /* OGOD */
- X if(price <= curntn->jewels){
- X
- X mvaddstr(county++,0,"DO YOU WISH TO BUY A RANDOM NEW POWER? [yn]");
- ***************
- *** 285,295 ****
- X #ifdef ORCTAKE
- X if((curntn->race==ORC)&&(curntn->jewels>=ORCTAKE)&&(curntn->spellpts>=TAKEPOINTS))
- X done |= orctake(&county);
- ! #endif ORCTAKE
- X }
- X if(isgod==TRUE) reset_god();
- X }
- ! #endif CONQUER
- X #ifdef ORCTAKE
- X /*do magic for both npcs and pcs in update*/
- X /*if target is 0 then it is update and target will be picked randomly*/
- --- 285,295 ----
- X #ifdef ORCTAKE
- X if((curntn->race==ORC)&&(curntn->jewels>=ORCTAKE)&&(curntn->spellpts>=TAKEPOINTS))
- X done |= orctake(&county);
- ! #endif /* ORCTAKE */
- X }
- X if(isgod==TRUE) reset_god();
- X }
- ! #endif /* CONQUER */
- X #ifdef ORCTAKE
- X /*do magic for both npcs and pcs in update*/
- X /*if target is 0 then it is update and target will be picked randomly*/
- ***************
- *** 341,347 ****
- X country=save;
- X return(0);
- X }
- ! #endif ORCTAKE
- X
- X /*execute new magic*/
- X void
- --- 341,347 ----
- X country=save;
- X return(0);
- X }
- ! #endif /* ORCTAKE */
- X
- X /*execute new magic*/
- X void
- ***************
- *** 392,398 ****
- X &&((rand()%2)==0)
- X #else
- X &&(tofood( &sct[x][y],0)<6)
- ! #endif DERVDESG
- X &&((x!=curntn->capx)
- X ||(y!=curntn->capy))){
- X sct[x][y].vegetation=DESERT;
- --- 392,398 ----
- X &&((rand()%2)==0)
- X #else
- X &&(tofood( &sct[x][y],0)<6)
- ! #endif /* DERVDESG */
- X &&((x!=curntn->capx)
- X ||(y!=curntn->capy))){
- X sct[x][y].vegetation=DESERT;
- ***************
- *** 401,407 ****
- X }
- X }
- X fprintf(fnews,"1.\tnation %s gets destroyer power: land turns to desert\n",curntn->name);
- ! #endif ADMIN
- X updmove(curntn->race,country);
- X return;
- X }
- --- 401,407 ----
- X }
- X }
- X fprintf(fnews,"1.\tnation %s gets destroyer power: land turns to desert\n",curntn->name);
- ! #endif /* ADMIN */
- X updmove(curntn->race,country);
- X return;
- X }
- ***************
- *** 636,643 ****
- X }
- X return(done);
- X }
- ! #endif ORCTAKE
- ! #endif CONQUER
- X #ifdef CONQUER
- X
- X /**********************************************************************/
- --- 636,643 ----
- X }
- X return(done);
- X }
- ! #endif /* ORCTAKE */
- ! #endif /* CONQUER */
- X #ifdef CONQUER
- X
- X /**********************************************************************/
- ***************
- *** 715,721 ****
- X }
- X return(valid);
- X }
- ! #endif CONQUER
- X
- X /*remove properties of magic power; must first remove power */
- X void
- --- 715,721 ----
- X }
- X return(valid);
- X }
- ! #endif /* CONQUER */
- X
- X /*remove properties of magic power; must first remove power */
- X void
- ***************
- *** 905,911 ****
- X if (getch()=='y') done=FALSE;
- X }
- X }
- ! #endif OGOD
- X
- X #define NUMSPELLS 4
- X char *spellstr[NUMSPELLS]={"(S)ummon","(F)light","(A)ttack Enhancement",
- --- 905,911 ----
- X if (getch()=='y') done=FALSE;
- X }
- X }
- ! #endif /* OGOD */
- X
- X #define NUMSPELLS 4
- X char *spellstr[NUMSPELLS]={"(S)ummon","(F)light","(A)ttack Enhancement",
- ***************
- *** 993,996 ****
- X else errormsg("You have no spell points for spell casting");
- X makebottom();
- X }
- ! #endif CONQUER
- --- 993,996 ----
- X else errormsg("You have no spell points for spell casting");
- X makebottom();
- X }
- ! #endif /* CONQUER */
- diff -cr ../oldconq4/main.c ./main.c
- *** ../oldconq4/main.c Thu Jul 9 19:29:35 1992
- --- ./main.c Thu Jul 9 18:18:56 1992
- ***************
- *** 58,63 ****
- --- 58,71 ----
- X int argc;
- X char **argv;
- X {
- + #ifdef USERLOG
- + FILE *userlog;
- + #endif
- + #ifdef CHECKUSER
- + int checkuser_mod = FALSE;
- + int checkuser_uid = 0;
- + int checkuser_list = FALSE;
- + #endif
- X int geteuid(), getuid(), setuid();
- X register int i,j;
- X char name[NAMELTH+1],filename[FILELTH];
- ***************
- *** 71,77 ****
- X extern char *optarg, conqmail[];
- X #ifdef SYSMAIL
- X extern char sysmail[];
- ! #endif SYSMAIL
- X int sflag=FALSE,pflag=FALSE,l,in_ch,old_ch=' ';
- X
- X char defaultdir[BIGLTH],tmppass[PASSLTH+1];
- --- 79,85 ----
- X extern char *optarg, conqmail[];
- X #ifdef SYSMAIL
- X extern char sysmail[];
- ! #endif /* SYSMAIL */
- X int sflag=FALSE,pflag=FALSE,l,in_ch,old_ch=' ';
- X
- X char defaultdir[BIGLTH],tmppass[PASSLTH+1];
- ***************
- *** 174,180 ****
- --- 182,192 ----
- X }
- X
- X /* process the command line arguments */
- + #ifdef CHECKUSER
- + while((i=getopt(argc,argv,"Ghpln:u:d:s"))!=EOF) switch(i){
- + #else
- X while((i=getopt(argc,argv,"Ghpn:d:s"))!=EOF) switch(i){
- + #endif
- X /* process the command line arguments */
- X case 'h': /* execute help program*/
- X initscr();
- ***************
- *** 203,213 ****
- --- 215,242 ----
- X case 'n':
- X strcpy(name, optarg);
- X break;
- + #ifdef CHECKUSER
- + case 'l':
- + checkuser_list = TRUE;
- + break;
- + case 'u':
- + checkuser_mod = TRUE; /* check for god later */
- + checkuser_uid = owneruid;
- + if (strlen (optarg) > 0)
- + if (getpwnam(optarg))
- + checkuser_uid = getpwnam(optarg)->pw_uid;
- + #endif
- X case 's': /*print the score*/
- X sflag++;
- X break;
- X case '?': /* print out command line arguments */
- + #ifdef CHECKUSER
- + fprintf(stderr,"Command line format: %s [-Ghpls -d DIR -nNAT -u USER]\n",argv[0]);
- + fprintf(stderr,"\t-u USER change nation username\n");
- + fprintf(stderr,"\t-l list nation owners\n");
- + #else
- X fprintf(stderr,"Command line format: %s [-Ghps -d DIR -nNAT]\n",argv[0]);
- + #endif
- X fprintf(stderr,"\t-n NAT play as nation NAT\n");
- X fprintf(stderr,"\t-d DIR to use play different game\n");
- X fprintf(stderr,"\t-G gaudily highlight nation in news\n");
- ***************
- *** 240,246 ****
- X * executable is setuid.
- X */
- X if (getuid() != geteuid()) { /* we are running suid */
- ! (void) umask(077); /* nobody else can read files */
- X (void) setuid (geteuid ()) ;
- X }
- X
- --- 269,275 ----
- X * executable is setuid.
- X */
- X if (getuid() != geteuid()) { /* we are running suid */
- ! (void) umask(MASK); /* nobody else can read files */
- X (void) setuid (geteuid ()) ;
- X }
- X
- ***************
- *** 282,288 ****
- X }
- X #else
- X if(strcmp(name,"god")==0) strcpy(name,"unowned");
- ! #endif OGOD
- X country=(-1);
- X for(i=0;i<NTOTAL;i++)
- X if(strcmp(name,ntn[i].name)==0) {
- --- 311,335 ----
- X }
- X #else
- X if(strcmp(name,"god")==0) strcpy(name,"unowned");
- ! #endif /* OGOD */
- !
- ! #ifdef CHECKUSER
- ! if ((checkuser_mod) || (checkuser_list)) {
- ! if ((owneruid == (getpwnam(LOGIN))->pw_uid) ||
- ! (owneruid == (getpwnam(ntn[0].leader))->pw_uid)) {
- ! /* don't change - already set */
- ! }
- ! else {
- ! checkuser_mod = FALSE;
- ! checkuser_list = FALSE;
- ! fprintf (stderr, "Sorry -- only god may modify/list a nation's uid\n");
- ! exit(FAIL);
- ! }
- ! }
- ! #else
- ! fprintf (stderr,"CHECKUSER not on\n");
- ! exit (FAIL);
- ! #endif
- X country=(-1);
- X for(i=0;i<NTOTAL;i++)
- X if(strcmp(name,ntn[i].name)==0) {
- ***************
- *** 372,377 ****
- --- 419,460 ----
- X exit(SUCCESS);
- X }
- X
- + #ifdef CHECKUSER
- + /* New code by "spide" */
- + if (checkuser_mod)
- + {
- + fprintf (stderr, "Nation: %s\n", curntn->name);
- + fprintf (stderr, " Current player = %s\n",
- + getpwuid(curntn->uid)->pw_name);;
- + curntn->uid = checkuser_uid;
- + fprintf (stderr, " New player = %s\n",
- + getpwuid(curntn->uid)->pw_name);
- + writedata();
- + exit (SUCCESS);
- + }
- + if (checkuser_list)
- + {
- + for (i=0; i < NTOTAL; i++)
- + if (ntn[i].active != INACTIVE)
- + fprintf (stderr, "%3d %15s %d %-15s\n",
- + i, ntn[i].name,
- + ntn[i].uid,
- + getpwuid(ntn[i].uid)->pw_name);
- + exit (SUCCESS);
- + }
- + if ((curntn->uid != owneruid) &&
- + (owneruid != (getpwnam(LOGIN))->pw_uid) &&
- + (owneruid != (getpwnam(ntn[0].leader))->pw_uid) &&
- + (curntn->uid != (getpwnam(LOGIN))->pw_uid))
- + {
- + fprintf (stderr,"\nSorry -- you are not the owner of %s",curntn->name);
- + fprintf(stderr,"\nFor information on conquer please contact %s.",OWNER);
- + fprintf(stderr,"\nor send mail to %s", LOGIN);
- + fprintf(stderr,"\n");
- + exit(FAIL);
- + }
- + #endif
- +
- X initscr(); /* SET UP THE SCREEN */
- X /* check terminal size */
- X if (COLS<80 || LINES<24) {
- ***************
- *** 425,436 ****
- X execute(FALSE);
- X #ifdef TRADE
- X checktrade();
- ! #endif TRADE
- X xcurs = curntn->capx;
- X ycurs = curntn->capy;
- X }
- X xoffset = 0;
- X yoffset = 0;
- X centermap();
- X updmove(curntn->race,country);
- X
- --- 508,525 ----
- X execute(FALSE);
- X #ifdef TRADE
- X checktrade();
- ! #endif /* TRADE */
- X xcurs = curntn->capx;
- X ycurs = curntn->capy;
- X }
- X xoffset = 0;
- X yoffset = 0;
- + #ifdef USERLOG
- + userlog = fopen (".userlog", "a");
- + fprintf (userlog, "%3d %15s %30s %15s\n",
- + TURN, getpwuid(owneruid)->pw_name, defaultdir, curntn->name);
- + fclose (userlog);
- + #endif
- X centermap();
- X updmove(curntn->race,country);
- X
- ***************
- *** 462,468 ****
- X } else {
- X (void) strcpy(sysmail,getenv("MAIL"));
- X }
- ! #endif SYSMAIL
- X mvaddstr(LINES-1, COLS-20, "PRESS ANY KEY");
- X refresh();
- X getch(); /* get response from copyscreen */
- --- 551,557 ----
- X } else {
- X (void) strcpy(sysmail,getenv("MAIL"));
- X }
- ! #endif /* SYSMAIL */
- X mvaddstr(LINES-1, COLS-20, "PRESS ANY KEY");
- X refresh();
- X getch(); /* get response from copyscreen */
- ***************
- *** 529,535 ****
- X if (conq_mail_status==NEW_MAIL) {
- X mvaddstr(LINES-3,COLS/2-6,"You have Conquer Mail");
- X }
- ! #endif SYSMAIL
- X }
- X
- X /************************************************************************/
- --- 618,624 ----
- X if (conq_mail_status==NEW_MAIL) {
- X mvaddstr(LINES-3,COLS/2-6,"You have Conquer Mail");
- X }
- ! #endif /* SYSMAIL */
- X }
- X
- X /************************************************************************/
- ***************
- *** 765,771 ****
- X curntn->tgold -= MOVECOST;
- X redraw=FULL;
- X break;
- ! #endif TRADE
- X case '9':
- X case 'u': /*move north-east*/
- X pager=0;
- --- 854,860 ----
- X curntn->tgold -= MOVECOST;
- X redraw=FULL;
- X break;
- ! #endif /* TRADE */
- X case '9':
- X case 'u': /*move north-east*/
- X pager=0;
- ***************
- *** 1247,1253 ****
- X
- X for(i=0;*(veg+i)!='0';i++)
- X if(sptr->vegetation==*(veg+i))
- ! mvprintw(LINES-11,COLS-9,"%s",*(vegname+i));
- X
- X if(((i=tofood(sptr,country)) != 0)
- X &&((magic(sptr->owner,THE_VOID)!=TRUE)
- --- 1336,1342 ----
- X
- X for(i=0;*(veg+i)!='0';i++)
- X if(sptr->vegetation==*(veg+i))
- ! mvprintw(LINES-11,COLS-10,"%s",*(vegname+i));
- X
- X if(((i=tofood(sptr,country)) != 0)
- X &&((magic(sptr->owner,THE_VOID)!=TRUE)
- ***************
- *** 1259,1265 ****
- X #else
- X if(i<10) mvprintw(LINES-11,COLS-2,"%d",i);
- X else mvprintw(LINES-11,COLS-3,"%d",i);
- ! #endif HPUX
- X standend();
- X }
- X
- --- 1348,1354 ----
- X #else
- X if(i<10) mvprintw(LINES-11,COLS-2,"%d",i);
- X else mvprintw(LINES-11,COLS-3,"%d",i);
- ! #endif /* HPUX */
- X standend();
- X }
- X
- ***************
- *** 1271,1277 ****
- X
- X for(i=0;(*(ele+i) != '0');i++)
- X if( sptr->altitude == *(ele+i) ){
- ! mvprintw(LINES-10,COLS-9,"%s",*(elename+i));
- X break;
- X }
- X }
- --- 1360,1366 ----
- X
- X for(i=0;(*(ele+i) != '0');i++)
- X if( sptr->altitude == *(ele+i) ){
- ! mvprintw(LINES-10,COLS-10,"%s",*(elename+i));
- X break;
- X }
- X }
- diff -cr ../oldconq4/makeworl.c ./makeworl.c
- *** ../oldconq4/makeworl.c Thu Jul 9 19:22:29 1992
- --- ./makeworl.c Thu Jul 9 18:19:15 1992
- ***************
- *** 141,147 ****
- X }
- X #else
- X (void) strcpy(ntn[0].leader,"god");
- ! #endif REMAKE
- X while(TRUE) {
- X mvprintw(9,0,"What demi-god shall co-rule this world? [%s]: ",ntn[0].leader);
- X clrtoeol();
- --- 141,147 ----
- X }
- X #else
- X (void) strcpy(ntn[0].leader,"god");
- ! #endif /* REMAKE */
- X while(TRUE) {
- X mvprintw(9,0,"What demi-god shall co-rule this world? [%s]: ",ntn[0].leader);
- X clrtoeol();
- ***************
- *** 193,198 ****
- --- 193,201 ----
- X newerror("That Name is Too long.");
- X }
- X }
- + #ifdef CHECKUSER
- + ntn[0].uid = getuid();
- + #endif
- X mvaddstr(8,0,"Please Enter the Size of the World. [Divisible by 8 and > 23]");
- X clrtoeol();
- X while(TRUE) {
- ***************
- *** 1134,1146 ****
- X
- X newmsg("... All random population and monsters placed");
- X sleep(1);
- ! #endif MONSTER
- X
- X for (i=0;i<MAXHELP;i++) {
- X sprintf(fname,"%s/%s%d",DEFAULTDIR,helpfile,i);
- X if ((fp=fopen(fname,"r"))==NULL) {
- X char tempc[BIGLTH];
- ! sprintf(tempc,"cannot find helpfile <%s/%s>.",DEFAULTDIR,fname);
- X newerror(tempc);
- X }
- X }
- --- 1137,1149 ----
- X
- X newmsg("... All random population and monsters placed");
- X sleep(1);
- ! #endif /* MONSTER */
- X
- X for (i=0;i<MAXHELP;i++) {
- X sprintf(fname,"%s/%s%d",DEFAULTDIR,helpfile,i);
- X if ((fp=fopen(fname,"r"))==NULL) {
- X char tempc[BIGLTH];
- ! sprintf(tempc,"cannot find helpfile <%s>.",fname);
- X newerror(tempc);
- X }
- X }
- ***************
- *** 1271,1275 ****
- X att_base(); /* get nation attributes */
- X newmsg("All NPC nations placed");
- X sleep(1);
- ! #endif NPC
- X }
- --- 1274,1278 ----
- X att_base(); /* get nation attributes */
- X newmsg("All NPC nations placed");
- X sleep(1);
- ! #endif /* NPC */
- X }
- diff -cr ../oldconq4/misc.c ./misc.c
- *** ../oldconq4/misc.c Thu Jul 9 19:26:26 1992
- --- ./misc.c Thu Jul 9 18:20:48 1992
- ***************
- *** 44,50 ****
- X
- X return( 0 );
- X } /* move_file() */
- ! #endif CONQUER
- X
- X /* returns integer input greater than zero or */
- X /* -1 for no input. */
- --- 44,50 ----
- X
- X return( 0 );
- X } /* move_file() */
- ! #endif /* CONQUER */
- X
- X /* returns integer input greater than zero or */
- X /* -1 for no input. */
- ***************
- *** 285,291 ****
- X free(history_reachp);
- X return( result );
- X } /* land_reachp() */
- ! #endif ADMIN
- X #ifdef ADMIN
- X /*
- X * water_2reachp()
- --- 285,291 ----
- X free(history_reachp);
- X return( result );
- X } /* land_reachp() */
- ! #endif /* ADMIN */
- X #ifdef ADMIN
- X /*
- X * water_2reachp()
- ***************
- *** 388,394 ****
- X
- X return( 0 );
- X } /* water_2reachp() */
- ! #endif ADMIN
- X #ifdef XYZ /* XYZ never is defined */
- X /*
- X * water_reachp()
- --- 388,394 ----
- X
- X return( 0 );
- X } /* water_2reachp() */
- ! #endif /* ADMIN */
- X #ifdef XYZ /* XYZ never is defined */
- X /*
- X * water_reachp()
- ***************
- *** 428,434 ****
- X
- X return( water_2reachp( ax, ay, move_points ) );
- X } /* water_reachp() */
- ! #endif 0
- X
- X /*
- X * solds_in_sector()
- --- 428,434 ----
- X
- X return( water_2reachp( ax, ay, move_points ) );
- X } /* water_reachp() */
- ! #endif /* 0 */
- X
- X /*
- X * solds_in_sector()
- ***************
- *** 538,544 ****
- X total += bonus/10;
- X return( total );
- X } /* score_one() */
- ! #endif ADMIN
- X /*
- X * print_accum()
- X */
- --- 538,544 ----
- X total += bonus/10;
- X return( total );
- X } /* score_one() */
- ! #endif /* ADMIN */
- X /*
- X * print_accum()
- X */
- ***************
- *** 585,591 ****
- X curntn = nptr;
- X return(count);
- X }
- ! #endif CONQUER
- X
- X int
- X num_powers(nation,type)
- --- 585,591 ----
- X curntn = nptr;
- X return(count);
- X }
- ! #endif /* CONQUER */
- X
- X int
- X num_powers(nation,type)
- ***************
- *** 637,643 ****
- X if ((magic(cntry,DERVISH)||magic(cntry,DESTROYER))
- X &&(sptr->vegetation==DESERT || sptr->vegetation==ICE))
- X return(6);
- ! #endif DERVDESG
- X return( 0 );
- X }
- X if(ntn[cntry].race == ELF){
- --- 637,643 ----
- X if ((magic(cntry,DERVISH)||magic(cntry,DESTROYER))
- X &&(sptr->vegetation==DESERT || sptr->vegetation==ICE))
- X return(6);
- ! #endif /* DERVDESG */
- X return( 0 );
- X }
- X if(ntn[cntry].race == ELF){
- ***************
- *** 849,855 ****
- X if(ispc(curntn->active)) {
- X fprintf(fm,"\tsector %d, %d joins nation %s\n",ntn[nation].name);
- X }
- ! #endif NOTDONE
- X }
- X }
- X }
- --- 849,855 ----
- X if(ispc(curntn->active)) {
- X fprintf(fm,"\tsector %d, %d joins nation %s\n",ntn[nation].name);
- X }
- ! #endif /* NOTDONE */
- X }
- X }
- X }
- ***************
- *** 958,964 ****
- X /* restore */
- X curntn = saventn;
- X }
- ! #endif ADMIN
- X
- X /*destroy nation--special case if capitol not owned by other nation*/
- X void
- --- 958,964 ----
- X /* restore */
- X curntn = saventn;
- X }
- ! #endif /* ADMIN */
- X
- X /*destroy nation--special case if capitol not owned by other nation*/
- X void
- ***************
- *** 1161,1167 ****
- X
- X return(hold);
- X }
- ! #endif CONQUER
- X #ifdef ADMIN
- X /* determines whether or not a unit has the ability to fly */
- X int
- --- 1161,1167 ----
- X
- X return(hold);
- X }
- ! #endif /* CONQUER */
- X #ifdef ADMIN
- X /* determines whether or not a unit has the ability to fly */
- X int
- ***************
- *** 1180,1186 ****
- X return(FALSE);
- X }
- X }
- ! #endif ADMIN
- X
- X void
- X spreadsheet(nation)
- --- 1180,1186 ----
- X return(FALSE);
- X }
- X }
- ! #endif /* ADMIN */
- X
- X void
- X spreadsheet(nation)
- ***************
- *** 1326,1332 ****
- X }
- X spread.revfood += product*TAXFOOD*nptr->tax_rate/100L;
- X }
- ! #endif DERVDESG
- X else { /* other sectors */
- X spread.inothr += sptr->people;
- X if(sptr->people>TOMANYPEOPLE) {
- --- 1326,1332 ----
- X }
- X spread.revfood += product*TAXFOOD*nptr->tax_rate/100L;
- X }
- ! #endif /* DERVDESG */
- X else { /* other sectors */
- X spread.inothr += sptr->people;
- X if(sptr->people>TOMANYPEOPLE) {
- ***************
- *** 1446,1452 ****
- X country=0;
- X curntn= &ntn[country];
- X }
- ! #endif CONQUER
- X
- X #ifdef ADMIN
- X int
- --- 1446,1452 ----
- X country=0;
- X curntn= &ntn[country];
- X }
- ! #endif /* CONQUER */
- X
- X #ifdef ADMIN
- X int
- ***************
- *** 1471,1477 ****
- X }
- X return(-1); /* shut lint up */
- X }
- ! #endif ADMIN
- X
- X /* name of the currently open mail file */
- X char tmp_mail_name[LINELTH];
- --- 1471,1477 ----
- X }
- X return(-1); /* shut lint up */
- X }
- ! #endif /* ADMIN */
- X
- X /* name of the currently open mail file */
- X char tmp_mail_name[LINELTH];
- ***************
- *** 1625,1631 ****
- X }
- X return(TRUE);
- X }
- ! #endif ADMIN
- X
- X /*******************************************************************/
- X /* DEFAULTUNIT() returns the default army type for a given country */
- --- 1625,1631 ----
- X }
- X return(TRUE);
- X }
- ! #endif /* ADMIN */
- X
- X /*******************************************************************/
- X /* DEFAULTUNIT() returns the default army type for a given country */
- ***************
- *** 1721,1727 ****
- X sptr->jewels = rand()%17 + 4;
- X }
- X }
- ! #endif ADMIN
- X
- X /* tg_ok returns true if a trade good can be seen by the owner of sector */
- X int
- --- 1721,1727 ----
- X sptr->jewels = rand()%17 + 4;
- X }
- X }
- ! #endif /* ADMIN */
- X
- X /* tg_ok returns true if a trade good can be seen by the owner of sector */
- X int
- ***************
- *** 1823,1829 ****
- X off_t conq_mail_size=0;
- X #ifdef SYSMAIL
- X static off_t sys_mail_size=0;
- ! #endif SYSMAIL
- X void
- X check_mail()
- X {
- --- 1823,1829 ----
- X off_t conq_mail_size=0;
- X #ifdef SYSMAIL
- X static off_t sys_mail_size=0;
- ! #endif /* SYSMAIL */
- X void
- X check_mail()
- X {
- ***************
- *** 1895,1900 ****
- X move(ycurs,2*xcurs);
- X refresh();
- X }
- ! #endif SYSMAIL
- X }
- ! #endif CONQUER
- --- 1895,1900 ----
- X move(ycurs,2*xcurs);
- X refresh();
- X }
- ! #endif /* SYSMAIL */
- X }
- ! #endif /* CONQUER */
- diff -cr ../oldconq4/navy.c ./navy.c
- *** ../oldconq4/navy.c Thu Jul 9 19:26:30 1992
- --- ./navy.c Thu Jul 9 18:19:46 1992
- ***************
- *** 234,240 ****
- X if (hold==99) hold=N_NOSPD;
- X return(hold);
- X }
- ! #endif ADMIN
- X
- X /* this function returns the amount of storage space in a */
- X /* given fleet. heavy+=3 medium+=2 light+=1. */
- --- 234,240 ----
- X if (hold==99) hold=N_NOSPD;
- X return(hold);
- X }
- ! #endif /* ADMIN */
- X
- X /* this function returns the amount of storage space in a */
- X /* given fleet. heavy+=3 medium+=2 light+=1. */
- ***************
- *** 268,274 ****
- X }
- X return(hold);
- X }
- ! #endif ADMIN
- X
- X /* this function returns the amount of storage space in galleys */
- X int
- --- 268,274 ----
- X }
- X return(hold);
- X }
- ! #endif /* ADMIN */
- X
- X /* this function returns the amount of storage space in galleys */
- X int
- ***************
- *** 542,545 ****
- X }
- X }
- X }
- ! #endif CONQUER
- --- 542,545 ----
- X }
- X }
- X }
- ! #endif /* CONQUER */
- diff -cr ../oldconq4/newhelp.c ./newhelp.c
- *** ../oldconq4/newhelp.c Thu Jul 9 19:17:27 1992
- --- ./newhelp.c Thu Jul 9 18:20:01 1992
- ***************
- *** 21,32 ****
- X {
- X FILE *fp, *fp2, *fopen();
- X if((fp=fopen("sed.1","w"))==NULL) {
- ! printf("cant open sed.1 file\n");
- X exit(FAIL);
- X }
- X /* needed as sed was reaching its limit on number of commands */
- X if((fp2=fopen("sed.2","w"))==NULL) {
- ! printf("cant open sed.2 file\n");
- X exit(FAIL);
- X }
- X
- --- 21,32 ----
- X {
- X FILE *fp, *fp2, *fopen();
- X if((fp=fopen("sed.1","w"))==NULL) {
- ! printf("cannot open sed.1 file\n");
- X exit(FAIL);
- X }
- X /* needed as sed was reaching its limit on number of commands */
- X if((fp2=fopen("sed.2","w"))==NULL) {
- ! printf("cannot open sed.2 file\n");
- X exit(FAIL);
- X }
- X
- ***************
- *** 202,208 ****
- X fprintf(fp,"s/XFINDPERCENT/%d/g\n",FINDPERCENT);
- X #ifdef ORCTAKE
- X fprintf(fp,"s/XTAKEPRICE/%d/g\n",ORCTAKE);
- ! #endif ORCTAKE
- X
- X fprintf(fp,"s/XTGATTR/%d/g\n",TGATTR);
- X fprintf(fp,"s/XOTHRATTR/%d/g\n",OTHRATTR);
- --- 202,208 ----
- X fprintf(fp,"s/XFINDPERCENT/%d/g\n",FINDPERCENT);
- X #ifdef ORCTAKE
- X fprintf(fp,"s/XTAKEPRICE/%d/g\n",ORCTAKE);
- ! #endif /* ORCTAKE */
- X
- X fprintf(fp,"s/XTGATTR/%d/g\n",TGATTR);
- X fprintf(fp,"s/XOTHRATTR/%d/g\n",OTHRATTR);
- diff -cr ../oldconq4/newlogin.c ./newlogin.c
- *** ../oldconq4/newlogin.c Thu Jul 9 19:29:35 1992
- --- ./newlogin.c Thu Jul 9 18:06:32 1992
- ***************
- *** 12,17 ****
- --- 12,18 ----
- X
- X /*create a new login for a new player*/
- X #include <ctype.h>
- + #include <pwd.h>
- X #include "patchlevel.h"
- X #include "header.h"
- X #include "data.h"
- ***************
- *** 342,351 ****
- X }
- X
- X void
- ! newlogin()
- X {
- X /* use points to create empire, add if late starter*/
- X int points, clr;
- SHAR_EOF
- true || echo 'restore of patches11 failed'
- fi
- echo 'End of part 1, continue with part 2'
- echo 2 > _shar_seq_.tmp
- exit 0
-